import request from '@/utils/request'

// 查询商品信息列表
export function listGoodsWarehouse(query) {
  return request({
    url: '/biz/goodsWarehouse/list',
    method: 'get',
    params: query
  })
}

// 查询商品信息详细
export function getGoodsWarehouse(goodsId) {
  return request({
    url: '/biz/goodsWarehouse/' + goodsId,
    method: 'get'
  })
}

// 新增商品信息
export function addGoodsWarehouse(data) {
  return request({
    url: '/biz/goodsWarehouse',
    method: 'post',
    data: data
  })
}

// 修改商品信息
export function updateGoodsWarehouse(data) {
  return request({
    url: '/biz/goodsWarehouse',
    method: 'put',
    data: data
  })
}

// 删除商品信息
export function delGoodsWarehouse(goodsId) {
  return request({
    url: '/biz/goodsWarehouse/' + goodsId,
    method: 'delete'
  })
}

// 导出商品信息
export function exportGoodsWarehouse(query) {
  return request({
    url: '/biz/goodsWarehouse/export',
    method: 'get',
    params: query
  })
}

// 下拉列表查询商品信息列表不分页
export function goodsWarehouseListNotPage(query) {
  return request({
    url: '/biz/goodsWarehouse/goodsWarehouseListNotPage',
    method: 'get',
    params: query
  })
}

//修改商品状态
export function updateStatus(data) {
  return request({
    url: '/biz/goodsWarehouse/updateStatus',
    method: 'post',
    data: data
  })
}